<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User&#39;s Guide: QwtPixelMatrix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.1.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_qwt_pixel_matrix.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_qwt_pixel_matrix-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QwtPixelMatrix Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A bit field corresponding to the pixels of a rectangle.  
 <a href="class_qwt_pixel_matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qwt__pixel__matrix_8h_source.html">qwt_pixel_matrix.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QwtPixelMatrix:</div>
<div class="dyncontent">
<div class="center"><img src="class_qwt_pixel_matrix__inherit__graph.png" border="0" usemap="#_qwt_pixel_matrix_inherit__map" alt="Inheritance graph"/></div>
<map name="_qwt_pixel_matrix_inherit__map" id="_qwt_pixel_matrix_inherit__map">
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa197eddf30db429ab267db2a875e7d71"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#aa197eddf30db429ab267db2a875e7d71">QwtPixelMatrix</a> (const QRect &amp;<a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a>)</td></tr>
<tr class="memdesc:aa197eddf30db429ab267db2a875e7d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aa197eddf30db429ab267db2a875e7d71">More...</a><br /></td></tr>
<tr class="separator:aa197eddf30db429ab267db2a875e7d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6691629e198fb39e6f653038cfb74f6b"><td class="memItemLeft" align="right" valign="top"><a id="a6691629e198fb39e6f653038cfb74f6b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a6691629e198fb39e6f653038cfb74f6b">~QwtPixelMatrix</a> ()</td></tr>
<tr class="memdesc:a6691629e198fb39e6f653038cfb74f6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a6691629e198fb39e6f653038cfb74f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8150f8d1f1922746172e9da1488e98b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#ae8150f8d1f1922746172e9da1488e98b">setRect</a> (const QRect &amp;<a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a>)</td></tr>
<tr class="separator:ae8150f8d1f1922746172e9da1488e98b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8194b741d283b9aa3a5c4b4e7d2a530f"><td class="memItemLeft" align="right" valign="top">QRect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a> () const</td></tr>
<tr class="separator:a8194b741d283b9aa3a5c4b4e7d2a530f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a0002dae3824ca4f7b09ecb65ffaaf93b">testPixel</a> (int x, int y) const</td></tr>
<tr class="memdesc:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a pixel has been set.  <a href="#a0002dae3824ca4f7b09ecb65ffaaf93b">More...</a><br /></td></tr>
<tr class="separator:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51c2ecd161c0c93dccb62fcf640ff280"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a51c2ecd161c0c93dccb62fcf640ff280">testAndSetPixel</a> (int x, int y, bool on)</td></tr>
<tr class="memdesc:a51c2ecd161c0c93dccb62fcf640ff280"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a pixel and test if a pixel has been set before.  <a href="#a51c2ecd161c0c93dccb62fcf640ff280">More...</a><br /></td></tr>
<tr class="separator:a51c2ecd161c0c93dccb62fcf640ff280"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab76786bae3b4b28300b77ca09ad2ce1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#ab76786bae3b4b28300b77ca09ad2ce1a">index</a> (int x, int y) const</td></tr>
<tr class="memdesc:ab76786bae3b4b28300b77ca09ad2ce1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the index in the bit field corresponding to a position.  <a href="#ab76786bae3b4b28300b77ca09ad2ce1a">More...</a><br /></td></tr>
<tr class="separator:ab76786bae3b4b28300b77ca09ad2ce1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A bit field corresponding to the pixels of a rectangle. </p>
<p><a class="el" href="class_qwt_pixel_matrix.html" title="A bit field corresponding to the pixels of a rectangle. ">QwtPixelMatrix</a> is intended to filter out duplicates in an unsorted array of points. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa197eddf30db429ab267db2a875e7d71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa197eddf30db429ab267db2a875e7d71">&#9670;&nbsp;</a></span>QwtPixelMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QwtPixelMatrix::QwtPixelMatrix </td>
          <td>(</td>
          <td class="paramtype">const QRect &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Bounding rectangle for the matrix </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab76786bae3b4b28300b77ca09ad2ce1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab76786bae3b4b28300b77ca09ad2ce1a">&#9670;&nbsp;</a></span>index()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int QwtPixelMatrix::index </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the index in the bit field corresponding to a position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Index, when <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a> contains pos - otherwise -1. </dd></dl>

</div>
</div>
<a id="a8194b741d283b9aa3a5c4b4e7d2a530f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8194b741d283b9aa3a5c4b4e7d2a530f">&#9670;&nbsp;</a></span>rect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRect QwtPixelMatrix::rect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Bounding rectangle </dd></dl>

</div>
</div>
<a id="ae8150f8d1f1922746172e9da1488e98b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8150f8d1f1922746172e9da1488e98b">&#9670;&nbsp;</a></span>setRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QwtPixelMatrix::setRect </td>
          <td>(</td>
          <td class="paramtype">const QRect &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the bounding rectangle of the matrix</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Bounding rectangle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>All bits are cleared </dd></dl>

</div>
</div>
<a id="a51c2ecd161c0c93dccb62fcf640ff280"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51c2ecd161c0c93dccb62fcf640ff280">&#9670;&nbsp;</a></span>testAndSetPixel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QwtPixelMatrix::testAndSetPixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>on</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set a pixel and test if a pixel has been set before. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">on</td><td>Set/Clear the pixel</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true, when pos is outside of <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a>, or when the pixel was set before. </dd></dl>

</div>
</div>
<a id="a0002dae3824ca4f7b09ecb65ffaaf93b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0002dae3824ca4f7b09ecb65ffaaf93b">&#9670;&nbsp;</a></span>testPixel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QwtPixelMatrix::testPixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test if a pixel has been set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true, when pos is outside of <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a>, or when the pixel has already been set. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_qwt_pixel_matrix.html">QwtPixelMatrix</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
